#pragma once

#include <QtWidgets/QMainWindow>
#include <queue>
#include <opencv2/opencv.hpp>
#include "ui_Smart_Classroom.h"
#include <ClassroomConfig.h>
#include <Windows.h>
typedef struct {
	char* ipaddress;
	char* port;
	char* username;
	char* password;
}DeviceInfo, *pDeviceInfo;
class Smart_Classroom : public QMainWindow
{
	Q_OBJECT

public:
	Smart_Classroom(QWidget *parent = Q_NULLPTR);
	
	~Smart_Classroom();
public slots:
	void Button_Start_Clicked();
	void Send_Status_Message(QString msg);
	void Button_Stop_Clicked();
	void Button_Next_Clicked();
	void Button_Previous_Clicked();
	void SelectItem_Changed();
private:
	int timer_ID;

	QLabel * msgLabel;
	ClassroomConfig config;
	QMap<QString, QString> CameraConfig;
	void Message_Queue_Receive();
	bool is_pose_start = false;
	Ui::Smart_ClassroomClass ui;
	QGraphicsScene *scene=NULL;
	void Set_Connect();
	virtual void timerEvent(QTimerEvent *event);
	DeviceInfo device;
	HANDLE thread_camera=NULL;
	HANDLE thread_pose=NULL;
	bool is_item_select_changed=false;
};
